﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace console.demo.thread
{
    /// <summary>
    ///  thread类创建多线程
    /// </summary>
    public class CreateThreadOneWay
    {
        public CreateThreadOneWay() { }

        /// <summary>
        ///  模拟下载方法
        /// </summary>
        public static void DownLoad() {
            Console.WriteLine("开始下载");
            Thread.Sleep(1000);
        }

        /// <summary>
        /// 创建多线程
        /// </summary>
        public void Run() { 
            Thread thread= new Thread(DownLoad); 
            thread.Start();
            Console.WriteLine("Main");
            Console.ReadKey();
        }
    }
}
